-- Quest: C:\QUESTS\WORKING\S0000501.Qbn.
-- Main story quest.
-- QuestId: 501
Messages: 62
Quest: S0000501
-- Message panels
QRC:

QuestComplete:  [1004]
<ce>                  %pcn, I knew I could count on you.
<ce>                The friendship of the Queen of Sentinel
<ce>                 is reward enough, but I have prepared
<ce>                   some more tangible gifts as well.

RumorsDuringQuest:  [1005]
<ce>    _traitor_ escaped from the dungeons of Castle Sentinel, I hear.
<ce>          He was about to be executed for treason, you know.

RumorsPostsuccess:  [1007]
<ce>      _traitor_ was trying to get Wayrest to support his claim to
<ce>     the throne of Sentinel, but the _queen_'s agents got to him.
<ce>      No one knows what happened to him, but I assume he's dead.

Message:  1020
%qdt:
 I received a letter from _queen_
 of Sentinel.  She says that _traitor_
 has escaped, and she would like me
 to come see her about tracking him down
 again.

Message:  1021
%qdt:
 _queen_'s spies have learned that
 _traitor_ is in Wayrest, stirring
 up trouble against Sentinel.  He
 is hiding somewhere in the dungeons
 of the royal castle there.  I am
 to find him and bring him back to
 Sentinel for execution in =time2_ days.

Message:  1022
%qdt:
 _traitor_ is my prisoner.  I am
 on my way back to Sentinel to turn
 him over to _queen_.

Message:  1030
Dear %pcn,
 
   I regret to inform you that your noble
 service to Sentinel has been undone.
 _traitor_ still has a few friends, it seems.
 He has escaped from the dungeon, only days
 before he was to be hanged.
   I would be most grateful for your assistance
 in putting this matter to rest once and for all.
 Please come and see me within =patsy_ days.
 
<ce>                             Your friend,
<ce>                                    
<ce>                          _queen_ of Sentinel

Message:  1031
<ce>               A stocky knight in the livery of Sentinel
<ce>                     stops before you and salutes.
<ce>                                    
<ce>                   "%pcn? A letter for you, personal
<ce>                    message from _queen_ herself."

Message:  1040
<ce>                Ah, %pcn, I was hoping you would come.
<ce>             My spies have located the elusive _traitor_.
<ce>               He has turned up at the court of Wayrest,
<ce>              of all places, apparently trying to obtain
<ce>             support for his pathetic claim to my throne.
<ce>               Wayrest would not be so rash as to openly
<ce>            give refuge to a convicted traitor to Sentinel,
<ce>             but he is hiding somewhere in Castle Wayrest,
<ce>            and I want you to find him and bring him back.
<ce>             Alive if possible, but kill him if necessary.
<ce>                     Do not let him escape again.
<ce>               You have =time2_ days.

Message:  1041
<ce>                    You again! %oth, will you give
<ce>                me no peace? I'll settle you this time!

Message:  1042
<ce>                  "Stop! Don't kill me! I surrender!"
<ce>                                    
<ce>                 Do you accept _traitor_'s surrender?

Message:  1043
<ce>                    The traitor _traitor_ is dead.

Message:  1044
<ce>                      _traitor_ drops his weapon,
<ce>                    and you quickly bind his hands
<ce>                     and blindfold him to prevent
<ce>                  any further trickery.  Now to make
<ce>                      your escape from Wayrest...

QuestTimeLapse:  [1045]
<ce>                  Then, by %god, we can die together!

Message:  1050
<ce>              Well, well, if it isn't my loyal _traitor_,
<ce>             come back to me.  Did you really believe you
<ce>                could escape my wrath? Guards, take him
<ce>                downstairs and execute him immediately.

Message:  1051
<ce>                _traitor_ deserved death.  I would have
<ce>                 preferred to execute him publicly, as
<ce>               an example to others of his ilk, but I am
<ce>          pleased that this sordid matter is finally closed.

Message:  1060
<ce>                 Did you think that you could dispose
<ce>                   of _traitor_ so easily? A Lord of
<ce>                 Sentinel is no one to cross lightly!

Message:  1061
<ce>                A knight in Sentinel livery approaches.
<ce>                   "I'll take this traitorous swine
<ce>                    _traitor_ off your hands now."


-- Symbols used in the QRC file:
--
--                %g occurs 1 time.
--              %god occurs 2 times.
--              %oth occurs 1 time.
--              %pcn occurs 4 times.
--              %qdt occurs 3 times.
--           _queen_ occurs 10 times.
--         _traitor_ occurs 16 times.

QBN:
Item _letter_ letter used 1030
Item _reward1_ item class 4 subclass 26
Item _reward2_ gold

Person _queen_ face 224 named Queen_Akorithi atHome
Person _traitor_ face 217 named Lord_K'avar

Place _wayrest_ permanent WayrestCastle2
Place aide remote dungeon

Clock _S.00_ 12.06:00 23.18:00
--shortened timer drastically. getting attacked by Kavar minions for months is annoying
Clock _patsy_ 30.00:00 0 flag 1 range 0 1
Clock _time2_ 00:00 0 flag 17 range 0 2

Foe _F.00_ is 3 Archer
Foe _mtraitor_ is Ranger

--	Quest start-up:
	create foe _F.00_ every 2000 minutes 20 times with 100% success 
	start timer _S.00_ 
	have _letter_ set _startpatsy_

_startpatsy_ task:
	start timer _patsy_ 

_S.00_ task:
	_letter_ used do _readletter_ 
	give pc _letter_ notify 1031 
	place npc _traitor_ at _wayrest_ 

variable _patsy_
_time2_ task:
	end quest 

_readletter_ task:
	log 1020 step 0 

_S.04_ task:
	clicked npc _queen_ 

_S.05_ task:
	clicked npc _traitor_ 
	hide npc _traitor_ 
	say 1041 
	place foe _mtraitor_ at _wayrest_ 

_hittraitor_ task:
	injured _mtraitor_ 

_S.07_ task:
	killed 1 _mtraitor_ 
	say 1043 

_S.08_ task:
	when _hittraitor_ and not _S.07_ 
	prompt 1042 yes _yes_ no _no_ 

_S.09_ task:
	when _S.04_ and _S.00_ 
	stop timer _patsy_
	start timer _time2_ 
	log 1021 step 1 
	say 1040 
	remove log step 0
	start task _stagger_

variable _stagger_
_clearclick_ task:
	when _stagger_ and _S.04_ and not _hittraitor_
	clear _S.04_ _clearclick_

_S.10_ task:
	when _yes_ and _S.04_ 
	say 1050 
	drop _traitor_ face 

_traitordead_ task:
	when _S.07_ and _S.04_ 
	say 1051 
	unset _S.04_ 

_yes_ task:
	log 1022 step 2 
	say 1044 
	add _traitor_ face 
	place foe _mtraitor_ at aide 

_no_ task:
	say 1045 

_S.14_ task:
	when _S.10_ or _traitordead_ 
	give pc _reward1_
	give pc _reward2_ 
	end quest 

_S.15_ task:
	when _patsy_ and not _S.09_ 
	end quest 

_S.16_ task:
	when _yes_ and _time2_ 
	say 1061 
	end quest 

_S.17_ task:
	injured _F.00_ 
	say 1060 
